Preserve PE export names with COFF symbol types - #706
Merged
Conversation
zardus
force-pushed
the
fix/pe-export-coff-symbol-types
branch
from
July 24, 2026 04:47
f783277 to
a565cf9
Compare
Member
|
Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/cle_706 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Summary
PE loading currently adds exports before COFF symbols. At a shared address, the later COFF spelling (for example,
_Name) can displace the public export spelling (Name). At the same time, every non-forwarded export is classified as a function, so exported data loses the object information already present in the COFF table.This change:
The behavior is confined to the PE backend; it does not change global symbol alias ordering for ELF or other formats.
DecBench results
I evaluated the three Dexter PE builds in DecBench. Each build has 104 unambiguous export/COFF matches (61 functions and 43 objects).
DetectShutdownspelling per build was excluded from this exact-name count and remains conservatively unchanged.A broader scan of 101 DecBench PE binaries found 3,453 exports. The change applies to 312 unambiguous matches (183 functions and 129 objects); the other 3,141 exports remain on the existing behavior. The scan found no conflicting-type acceptance, duplicate-address mismatch, or ordinal-only-name change.
Regression coverage
The new fixture-free tests construct minimal PE/COFF inputs and cover function and object inheritance, same-address public-name precedence, local/static-symbol exclusion, ambiguity fallback, missing-hint fallback, and forwarded-export fallback.
Validation: